package com.flurry.android;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;

final class ca
{
  private static ca dX;
  private HashMap<String, bl> dY = new HashMap();

  static ca aq()
  {
    if (dX == null)
      dX = new ca();
    return dX;
  }

  static boolean c(long paramLong)
  {
    return paramLong <= System.currentTimeMillis();
  }

  final void a(bl parambl)
  {
    while (true)
    {
      try
      {
        if (parambl.ab().length() == 0)
          return;
        try
        {
          if (this.dY.containsKey(parambl.ab()))
          {
            this.dY.remove(parambl.ab());
            if (parambl.ae() != -1)
              this.dY.put(parambl.ab(), parambl);
            return;
          }
        }
        finally
        {
        }
      }
      catch (Exception localException)
      {
        localException.printStackTrace();
        return;
      }
      this.dY.put(parambl.ab(), parambl);
    }
  }

  final List<bl> ar()
  {
    ArrayList localArrayList;
    try
    {
      try
      {
        localArrayList = new ArrayList();
        Iterator localIterator = this.dY.values().iterator();
        while (localIterator.hasNext())
          localArrayList.add(((bl)localIterator.next()).aa());
      }
      finally
      {
      }
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
      return null;
    }
    return localArrayList;
  }

  final void as()
  {
    try
    {
      try
      {
        Iterator localIterator = ar().iterator();
        while (localIterator.hasNext())
        {
          bl localbl = (bl)localIterator.next();
          if (c(localbl.ah()))
          {
            new StringBuilder().append("expiring adunit freq cap for idHash: ").append(localbl.ab()).append(" adunit exp: ").append(localbl.ah()).append(" device epoch").append(System.currentTimeMillis()).toString();
            m(localbl.ab());
          }
        }
      }
      finally
      {
      }
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
      return;
    }
  }

  final bl l(String paramString)
  {
    try
    {
      try
      {
        if (this.dY.containsKey(paramString))
        {
          bl localbl = (bl)this.dY.get(paramString);
          return localbl;
        }
        return null;
      }
      finally
      {
      }
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
    return null;
  }

  final void m(String paramString)
  {
    try
    {
      try
      {
        if (this.dY.containsKey(paramString))
          this.dY.remove(paramString);
        return;
      }
      finally
      {
      }
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.flurry.android.ca
 * JD-Core Version:    0.6.2
 */